package com.yc.navy.dayfresh.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yc.navy.dayfresh.entity.TagFav;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author navy
 * @company 源辰信息
 * @date 2024/9/9
 * @email haijunzhou@hnit.edu.cn
 */
public interface TagFavMapper extends BaseMapper<TagFav> {
    @Select("select * from tag_fav where tid =#{tid} and fid != #{fid}")
    List<TagFav> selectTagFavByFid(Integer tid, Integer fid);

    @Update("delete from tag_fav where fid = #{fid}")
    int deleteTagFav(int fid);

    @Select("select tid from tag_fav where fid = #{fid}")
    List<Integer> selectTidByFid(int fid);
}
